-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix shell launcher test (dart2 compliant and stop polling) #5009
Conversation
…o start, run and resume.
|
cc @Hixie |
| if (params == null) { | ||
| return; | ||
| } | ||
| final Map<String, dynamic> event = params['event']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider factoring out as onServiceEvent(event)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| }); | ||
| Expect.equals(isolate['type'], 'Isolate'); | ||
| Expect.isNotNull(isolate['pauseEvent']); | ||
| // If it is not runnable, wait until it becomes runnable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code here is interested in the isolate being paused at start, so it should look for that condition instead of runnable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
rmacnak-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
First commit is just making the code dart2 compilant(so the test can be run with --preview-dart-2).
Second commit replaces polling with listening for service events to wait for when isolate starts, runs and resumes.
Fixes flutter/flutter#16572